Skip to content

fix: add direct ion-icon component import path #1464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2025

Conversation

brandyscarney
Copy link
Member

Ionic Framework needs the import path otherwise it throws this error:

src/index.ts → dist/...
(!) Plugin typescript: @rollup/plugin-typescript TS2307: Cannot find module 'ionicons/components/ion-icon.js' or its corresponding type declarations.
src/components/IonIcon.ts: (2:37)

2 import { defineCustomElement } from "ionicons/components/ion-icon.js";

Verification steps:

  1. Clone this PR branch
  2. Install dependencies: npm install
  3. Build and pack the project: npm run build && npm pack
  4. Copy the .tgz into ~/Downloads: cp ionicons-*.tgz ~/Downloads/ionicons.tgz
  5. Navigate to packages/vue in ionic-framework
  6. Install the .tgz: npm i ~/Downloads/ionicons.tgz
  7. Build Vue: npm run build
  8. Observe: Ionic Framework builds successfully

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@christian-bromann christian-bromann merged commit 72e8c23 into main Jul 7, 2025
6 checks passed
@christian-bromann christian-bromann deleted the fix-icons-imports branch July 7, 2025 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants